/*
 * Initializing.cpp
 *
 *  Created on: Jan 27, 2011
 *      Author: bvd
 */

#include "PowerOnSelfTest.h"

PowerOnSelfTest* PowerOnSelfTest::pInstance = 0;

PowerOnSelfTest::PowerOnSelfTest() {
}

PowerOnSelfTest::~PowerOnSelfTest() {
	delete pInstance;
}

void PowerOnSelfTest::selfTestOK(Context* context) {
	context->setCurrentState(Initializing::getInstance());
}

void PowerOnSelfTest::selfTestFailed(Context* context) {
	context->setCurrentState(Failure::getInstance());
}

PowerOnSelfTest* PowerOnSelfTest::getInstance() {
	if(!pInstance) {
		pInstance = new PowerOnSelfTest();
	}
	return pInstance;
}
